package com.action.commute;

import com.db.commute.CommuteDAO;

public class UserInfoAction {
	private CommuteDAO commDAO;
	private int cno;
	private int sabun;
	
	public void setCommDAO(CommuteDAO commDAO) {
		this.commDAO = commDAO;
	}
	public void setSabun(int sabun) {
		this.sabun = sabun;
	}
	public int getCno() {
		return cno;
	}

	public String execute()throws Exception
	{		
		if(commDAO.IsExist(sabun)==false){
			commDAO.Insert(sabun);
		}
		//System.out.println(sabun);
		//System.out.println(cDAO.IsExist(sabun));
		cno = commDAO.getCno(sabun);
		return "success";
	}

}
